<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>会员列表 - 社交圈</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome 图标 -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    
    <style>
        :root {
            --primary: #3b82f6;
            --primary-light: #60a5fa;
            --primary-dark: #2563eb;
            --secondary: #8b5cf6;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --text-primary: #1e293b;
            --text-secondary: #64748b;
            --bg-light: #f8fafc;
            --bg-white: #ffffff;
            --border-light: #e2e8f0;
            --radius: 12px;
            --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background-color: var(--bg-light);
            color: var(--text-primary);
            padding-top: 56px;
            padding-bottom: 60px;
        }
        
        /* 顶部导航 */
        .top-nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 56px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 16px;
            z-index: 1000;
            border-bottom: 1px solid var(--border-light);
        }
        
        .nav-title {
            font-size: 1.1rem;
            font-weight: 600;
        }
        
        .nav-action {
            color: var(--text-secondary);
            background: none;
            border: none;
            font-size: 1.2rem;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .nav-action:hover {
            background-color: var(--bg-light);
        }
        
        .nav-action.primary {
            color: var(--primary);
        }
        
        /* 搜索和筛选区 */
        .search-filter-bar {
            padding: 12px 16px;
            background-color: var(--bg-white);
            border-bottom: 1px solid var(--border-light);
        }
        
        .search-box {
            position: relative;
            margin-bottom: 12px;
        }
        
        .search-input {
            width: 100%;
            padding: 10px 16px 10px 40px;
            border-radius: 30px;
            border: 1px solid var(--border-light);
            font-size: 0.9rem;
            background-color: var(--bg-light);
        }
        
        .search-input:focus {
            outline: none;
            border-color: var(--primary-light);
        }
        
        .search-icon {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-secondary);
        }
        
        .filter-options {
            display: flex;
            gap: 8px;
            overflow-x: auto;
            padding-bottom: 4px;
        }
        
        .filter-option {
            padding: 6px 14px;
            background-color: var(--bg-light);
            border-radius: 20px;
            font-size: 0.85rem;
            color: var(--text-primary);
            border: 1px solid var(--border-light);
            white-space: nowrap;
        }
        
        .filter-option.active {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        /* 列表视图切换 */
        .view-toggle {
            padding: 8px 16px;
            background-color: var(--bg-white);
            border-bottom: 1px solid var(--border-light);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .view-title {
            font-size: 0.9rem;
            font-weight: 600;
        }
        
        .view-options {
            display: flex;
            gap: 12px;
        }
        
        .view-btn {
            width: 32px;
            height: 32px;
            border-radius: 6px;
            background-color: var(--bg-light);
            border: 1px solid var(--border-light);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-secondary);
        }
        
        .view-btn.active {
            background-color: var(--primary);
            color: white;
            border-color: var(--primary);
        }
        
        /* 会员列表容器 */
        .members-list {
            padding: 12px;
        }
        
        /* 卡片式列表 */
        .members-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
        }
        
        /* 列表式布局 */
        .members-list-view {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        
        /* 会员卡片基础样式 */
        .member-card {
            background-color: var(--bg-white);
            border-radius: var(--radius);
            overflow: hidden;
            box-shadow: var(--shadow);
            border: 1px solid var(--border-light);
            transition: transform 0.2s ease;
        }
        
        .member-card:hover {
            transform: translateY(-2px);
        }
        
        /* 列表式卡片样式 */
        .list-view .member-card {
            display: flex;
            height: 120px;
        }
        
        /* 会员图片区域 */
        .member-media {
            position: relative;
            background-color: var(--bg-light);
        }
        
        /* 网格视图图片样式 */
        .grid-view .member-media {
            height: 140px;
            width: 100%;
        }
        
        /* 列表视图图片样式 */
        .list-view .member-media {
            width: 100px;
            flex-shrink: 0;
        }
        
        /* 无图片样式 */
        .no-media .member-media {
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-secondary);
        }
        
        .no-media-placeholder {
            font-size: 2rem;
        }
        
        /* 单张图片样式 */
        .single-media .member-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        /* 多张图片样式 */
        .multiple-media .media-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            grid-template-rows: repeat(2, 1fr);
            width: 100%;
            height: 100%;
        }
        
        .multiple-media .media-item {
            width: 100%;
            height: 100%;
            overflow: hidden;
        }
        
        .multiple-media .media-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        /* 图片数量标记 */
        .media-count {
            position: absolute;
            bottom: 6px;
            right: 6px;
            background-color: rgba(0, 0, 0, 0.6);
            color: white;
            font-size: 0.7rem;
            padding: 2px 6px;
            border-radius: 10px;
        }
        
        /* 会员信息区域 */
        .member-info {
            padding: 12px;
        }
        
        .grid-view .member-info {
            max-height: 100px;
            overflow: hidden;
        }
        
        .list-view .member-info {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        
        .member-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 6px;
        }
        
        .member-name {
            font-weight: 600;
            font-size: 0.95rem;
            display: flex;
            align-items: center;
            gap: 4px;
        }
        
        .member-status {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }
        
        .status-online {
            background-color: var(--success);
        }
        
        .status-offline {
            background-color: var(--text-secondary);
        }
        
        .member-distance {
            font-size: 0.75rem;
            color: var(--text-secondary);
        }
        
        .member-skills {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
            margin-bottom: 6px;
        }
        
        .skill-tag {
            padding: 2px 8px;
            background-color: var(--bg-light);
            border-radius: 10px;
            font-size: 0.7rem;
            color: var(--text-secondary);
            border: 1px solid var(--border-light);
        }
        
        .member-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.75rem;
            color: var(--text-secondary);
        }
        
        .member-actions {
            display: flex;
            gap: 8px;
        }
        
        .action-icon-btn {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.85rem;
        }
        
        .message-btn {
            background-color: var(--primary);
            color: white;
            border: none;
        }
        
        .follow-btn {
            background-color: var(--bg-light);
            color: var(--text-primary);
            border: 1px solid var(--border-light);
        }
        
        .follow-btn.following {
            background-color: var(--bg-light);
            color: var(--danger);
            border-color: var(--danger);
        }
        
        /* 加载更多 */
        .load-more {
            padding: 15px 0;
            text-align: center;
            font-size: 0.9rem;
            color: var(--primary);
        }
        
        /* 底部导航 */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 60px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-around;
            align-items: center;
            border-top: 1px solid var(--border-light);
            z-index: 1000;
        }
        
        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: var(--text-secondary);
            font-size: 0.7rem;
            gap: 4px;
            flex: 1;
            height: 100%;
        }
        
        .nav-item.active {
            color: var(--primary);
        }
        
        .nav-icon {
            font-size: 1.2rem;
        }
        
        /* 提示消息 */
        .toast {
            position: fixed;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%);
            background-color: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 8px 16px;
            border-radius: 4px;
            z-index: 9999;
            font-size: 0.85rem;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .toast.show {
            opacity: 1;
        }
    </style>
</head>
<body class="grid-view">
    <!-- 顶部导航 -->
    <div class="top-nav">
        <button class="nav-action" id="backBtn">
            <i class="fas fa-arrow-left"></i>
        </button>
        <div class="nav-title">推荐会员</div>
        <button class="nav-action primary" id="filterBtn">
            <i class="fas fa-sliders-h"></i>
        </button>
    </div>
    
    <!-- 搜索和筛选区 -->
    <div class="search-filter-bar">
        <div class="search-box">
            <i class="fas fa-search search-icon"></i>
            <input type="text" class="search-input" placeholder="搜索会员、技能或标签...">
        </div>
        
        <div class="filter-options">
            <div class="filter-option active">全部会员</div>
            <div class="filter-option">附近的人</div>
            <div class="filter-option">新加入</div>
            <div class="filter-option">在线会员</div>
            <div class="filter-option">有共同技能</div>
            <div class="filter-option">已认证</div>
        </div>
    </div>
    
    <!-- 列表视图切换 -->
    <div class="view-toggle">
        <div class="view-title">找到 32 位会员</div>
        <div class="view-options">
            <button class="view-btn active" id="gridViewBtn" title="网格视图">
                <i class="fas fa-th"></i>
            </button>
            <button class="view-btn" id="listViewBtn" title="列表视图">
                <i class="fas fa-list"></i>
            </button>
        </div>
    </div>
    
    <!-- 会员列表 -->
    <div class="members-list">
        <div class="members-container members-grid">
            <!-- 1. 多图会员卡片 -->
            <div class="member-card multiple-media">
                <div class="member-media">
                    <div class="media-grid">
                        <div class="media-item">
                            <img src="https://picsum.photos/id/119/300/300" alt="会员作品1">
                        </div>
                        <div class="media-item">
                            <img src="https://picsum.photos/id/133/300/300" alt="会员作品2">
                        </div>
                        <div class="media-item">
                            <img src="https://picsum.photos/id/142/300/300" alt="会员作品3">
                        </div>
                        <div class="media-item">
                            <img src="https://picsum.photos/id/160/300/300" alt="会员作品4">
                        </div>
                    </div>
                    <div class="media-count">4</div>
                </div>
                <div class="member-info">
                    <div class="member-header">
                        <div class="member-name">
                            陈佳琪
                            <span class="member-status status-online"></span>
                        </div>
                        <div class="member-distance">3.2km</div>
                    </div>
                    <div class="member-skills">
                        <span class="skill-tag">UI设计</span>
                        <span class="skill-tag">摄影</span>
                    </div>
                    <div class="member-meta">
                        <span><i class="fas fa-clock"></i> 今天活跃</span>
                        <div class="member-actions">
                            <button class="action-icon-btn message-btn" data-name="陈佳琪">
                                <i class="fas fa-comment"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 2. 单图会员卡片 -->
            <div class="member-card single-media">
                <div class="member-media">
                    <img src="https://picsum.photos/id/91/300/300" alt="王建国" class="member-image">
                </div>
                <div class="member-info">
                    <div class="member-header">
                        <div class="member-name">
                            王建国
                            <span class="member-status status-online"></span>
                        </div>
                        <div class="member-distance">8.3km</div>
                    </div>
                    <div class="member-skills">
                        <span class="skill-tag">摄影</span>
                        <span class="skill-tag">Python</span>
                    </div>
                    <div class="member-meta">
                        <span><i class="fas fa-clock"></i> 1天前活跃</span>
                        <div class="member-actions">
                            <button class="action-icon-btn message-btn" data-name="王建国">
                                <i class="fas fa-comment"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 3. 无图会员卡片 -->
            <div class="member-card no-media">
                <div class="member-media">
                    <i class="fas fa-user no-media-placeholder"></i>
                </div>
                <div class="member-info">
                    <div class="member-header">
                        <div class="member-name">
                            张婷
                            <span class="member-status status-offline"></span>
                        </div>
                        <div class="member-distance">5.7km</div>
                    </div>
                    <div class="member-skills">
                        <span class="skill-tag">钢琴</span>
                        <span class="skill-tag">音乐</span>
                    </div>
                    <div class="member-meta">
                        <span><i class="fas fa-clock"></i> 3天前活跃</span>
                        <div class="member-actions">
                            <button class="action-icon-btn message-btn" data-name="张婷">
                                <i class="fas fa-comment"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 4. 多图会员卡片 -->
            <div class="member-card multiple-media">
                <div class="member-media">
                    <div class="media-grid">
                        <div class="media-item">
                            <img src="https://picsum.photos/id/22/300/300" alt="李强作品1">
                        </div>
                        <div class="media-item">
                            <img src="https://picsum.photos/id/29/300/300" alt="李强作品2">
                        </div>
                        <div class="media-item">
                            <img src="https://picsum.photos/id/42/300/300" alt="李强作品3">
                        </div>
                    </div>
                    <div class="media-count">3</div>
                </div>
                <div class="member-info">
                    <div class="member-header">
                        <div class="member-name">
                            李强
                            <span class="member-status status-online"></span>
                        </div>
                        <div class="member-distance">2.1km</div>
                    </div>
                    <div class="member-skills">
                        <span class="skill-tag">健身</span>
                        <span class="skill-tag">烹饪</span>
                    </div>
                    <div class="member-meta">
                        <span><i class="fas fa-clock"></i> 刚刚活跃</span>
                        <div class="member-actions">
                            <button class="action-icon-btn message-btn" data-name="李强">
                                <i class="fas fa-comment"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 5. 单图会员卡片 -->
            <div class="member-card single-media">
                <div class="member-media">
                    <img src="https://picsum.photos/id/65/300/300" alt="赵敏" class="member-image">
                </div>
                <div class="member-info">
                    <div class="member-header">
                        <div class="member-name">
                            赵敏
                            <span class="member-status status-offline"></span>
                        </div>
                        <div class="member-distance">10.5km</div>
                    </div>
                    <div class="member-skills">
                        <span class="skill-tag">英语</span>
                        <span class="skill-tag">瑜伽</span>
                    </div>
                    <div class="member-meta">
                        <span><i class="fas fa-clock"></i> 1周前活跃</span>
                        <div class="member-actions">
                            <button class="action-icon-btn follow-btn" data-name="赵敏">
                                <i class="fas fa-plus"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 6. 无图会员卡片 -->
            <div class="member-card no-media">
                <div class="member-media">
                    <i class="fas fa-user no-media-placeholder"></i>
                </div>
                <div class="member-info">
                    <div class="member-header">
                        <div class="member-name">
                            陈明
                            <span class="member-status status-online"></span>
                        </div>
                        <div class="member-distance">1.8km</div>
                    </div>
                    <div class="member-skills">
                        <span class="skill-tag">编程</span>
                        <span class="skill-tag">吉他</span>
                    </div>
                    <div class="member-meta">
                        <span><i class="fas fa-clock"></i> 2小时前活跃</span>
                        <div class="member-actions">
                            <button class="action-icon-btn follow-btn following" data-name="陈明">
                                <i class="fas fa-check"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 加载更多 -->
        <div class="load-more" id="loadMore">
            <span>加载更多会员</span>
        </div>
    </div>
    
    <!-- 底部导航 -->
    <div class="bottom-nav">
        <div class="nav-item">
            <i class="fas fa-home nav-icon"></i>
            <span>首页</span>
        </div>
        <div class="nav-item">
            <i class="fas fa-compass nav-icon"></i>
            <span>发现</span>
        </div>
        <div class="nav-item active">
            <i class="fas fa-users nav-icon"></i>
            <span>会员</span>
        </div>
        <div class="nav-item">
            <i class="fas fa-bell nav-icon"></i>
            <span>通知</span>
        </div>
        <div class="nav-item">
            <i class="fas fa-user nav-icon"></i>
            <span>我的</span>
        </div>
    </div>
    
    <!-- 提示消息元素 -->
    <div class="toast" id="toast"></div>
    
    <!-- Bootstrap JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        // 视图切换
        const gridViewBtn = document.getElementById('gridViewBtn');
        const listViewBtn = document.getElementById('listViewBtn');
        const membersContainer = document.querySelector('.members-container');
        const body = document.body;
        
        gridViewBtn.addEventListener('click', function() {
            body.classList.remove('list-view');
            body.classList.add('grid-view');
            membersContainer.classList.remove('members-list-view');
            membersContainer.classList.add('members-grid');
            gridViewBtn.classList.add('active');
            listViewBtn.classList.remove('active');
        });
        
        listViewBtn.addEventListener('click', function() {
            body.classList.remove('grid-view');
            body.classList.add('list-view');
            membersContainer.classList.remove('members-grid');
            membersContainer.classList.add('members-list-view');
            listViewBtn.classList.add('active');
            gridViewBtn.classList.remove('active');
        });
        
        // 筛选选项
        document.querySelectorAll('.filter-option').forEach(option => {
            option.addEventListener('click', function() {
                document.querySelectorAll('.filter-option').forEach(opt => opt.classList.remove('active'));
                this.classList.add('active');
                showToast(`已筛选：${this.textContent}`);
            });
        });
        
        // 搜索功能
        document.querySelector('.search-input').addEventListener('keypress', function(e) {
            if (e.key === 'Enter' && this.value.trim()) {
                showToast(`搜索会员：${this.value.trim()}`);
            }
        });
        
        // 联系按钮
        document.querySelectorAll('.message-btn').forEach(btn => {
            btn.addEventListener('click', function() {
                const userName = this.getAttribute('data-name');
                showToast(`打开与${userName}的聊天窗口`);
            });
        });
        
        // 关注按钮
        document.querySelectorAll('.follow-btn').forEach(btn => {
            btn.addEventListener('click', function() {
                const userName = this.getAttribute('data-name');
                const isFollowing = this.classList.contains('following');
                
                if (isFollowing) {
                    this.classList.remove('following');
                    this.innerHTML = '<i class="fas fa-plus"></i>';
                    showToast(`已取消关注${userName}`);
                } else {
                    this.classList.add('following');
                    this.innerHTML = '<i class="fas fa-check"></i>';
                    showToast(`已关注${userName}`);
                }
            });
        });
        
        // 加载更多
        document.getElementById('loadMore').addEventListener('click', function() {
            this.innerHTML = '<i class="fas fa-spinner fa-spin"></i> 加载中...';
            
            // 模拟加载延迟
            setTimeout(() => {
                this.innerHTML = '<span>加载更多会员</span>';
                showToast('已加载更多会员');
            }, 1500);
        });
        
        // 返回按钮
        document.getElementById('backBtn').addEventListener('click', function() {
            history.back();
        });
        
        // 筛选按钮
        document.getElementById('filterBtn').addEventListener('click', function() {
            showToast('高级筛选功能已打开');
        });
        
        // 提示消息功能
        function showToast(message) {
            const toast = document.getElementById('toast');
            toast.textContent = message;
            toast.classList.add('show');
            
            setTimeout(() => {
                toast.classList.remove('show');
            }, 2000);
        }
    </script>
</body>
</html>

